package com.usf.jprovider.schema.selector.value;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;

import com.usf.jprovider.constants.Constants;
import com.usf.jprovider.object.JObjectNode;
import com.usf.jprovider.object.env.Environment;
import com.usf.jprovider.schema.selector.AbstractSelector;
import com.usf.jprovider.schema.selector.value.split.AbstractSplitValue;

@XmlSeeAlso({
	EqualValue.class, 
	AbstractSplitValue.class})

public abstract class AbstractValueSelector extends AbstractSelector {

	@XmlAttribute protected boolean ignoreCase;
	
	public AbstractValueSelector(){
		ignoreCase = Constants.DEFAULT_SELECTOR_VALUE_IGNORE_CASE;
	}
	
	public boolean isIgnoreCase() {
		return ignoreCase;
	}

	public abstract String create(Environment env, JObjectNode node, String source);	
	public abstract boolean check(Environment env, JObjectNode node, String source, String value);
	
	public abstract String toQuery(String column);
	
}